// 评论相关请求模块

import request from '@/utils/request'
// import mockRequest from '@/utils/mockAjax'

// 获取评论或评论回复
export const getArticles = (params) => request({
    method: 'GET',
    url: '/v1_0/comments',
    params
})

// 点赞评论或评论回复
export const addLiking = (data) => request({
    method: 'POST',
    url: '/v1_0/comment/likings',
    data
})

// 取消对评论或评论回复点赞
export const deteleLiking = (target) => request({
    method: 'DELETE',
    url: `/v1_0/comment/likings/${target}`,
})

// 添加评论或评论回复
export const addComment = (data) => request({
    method: 'POST',
    url: `/v1_0/comments`,
    data
})